Separate the HTML guts of the user login form into a template to keep the code more...
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
1 <?php
2
3 /**
4 * HTML template for Special:Userlogin form
5 * @package MediaWiki
6 * @subpackage Templates
7 */
8 class UserloginTemplate extends QuickTemplate {
9 function execute() {
10 if( $this->data['error'] ) {
11 ?>
12 <h2><?php $this->msg('loginerror') ?>:</h2>
13 <p class='error'><?php $this->html('error') ?></p>
14 <?php } else { ?>
15 <h2><?php $this->msg('login' ) ?>:</h2>
16 <p><?php $this->msg('loginprompt') ?></p>
17 <?php } ?>
18 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
19 <table border='0'>
20 <tr>
21 <td align='right'><?php $this->msg('yourname') ?>:</td>
22 <td align='left'>
23 <input tabindex='1' type='text' name="wpName"
24 value="<?php $this->text('name') ?>" size='20' />
25 </td>
26 <td align='left'>
27 <input tabindex='3' type='submit' name="wpLoginattempt"
28 value="<?php $this->msg('login') ?>" />
29 </td>
30 </tr>
31 <tr>
32 <td align='right'><?php $this->msg('yourpassword') ?>:</td>
33 <td align='left'>
34 <input tabindex='2' type='password' name="wpPassword"
35 value="<?php $this->text('password') ?>" size='20' />
36 </td>
37 <td align='left'>
38 <input tabindex='4' type='checkbox' name="wpRemember"
39 value="1" id="wpRemember"
40 <?php if( $this->data['remember'] ) { ?>checked="checked"<?php } ?>
41 /><label for="wpRemember"><?php $this->msg('remembermypassword') ?></label>
42 </td>
43 </tr>
44 <?php if( $this->data['create'] ) { ?>
45 <tr>
46 <td colspan='3'>&nbsp;</td>
47 </tr>
48 <tr>
49 <td align='right'><?php $this->msg('yourpasswordagain') ?>:</td>
50 <td align='left'>
51 <input tabindex='5' type='password' name="wpRetype"
52 value="<?php $this->text('retype') ?>"
53 size='20' />
54 </td>
55 <td><?php $this->msg('newusersonly') ?></td>
56 </tr>
57 <tr>
58 <td align='right'><?php $this->msg('youremail') ?>:</td>
59 <td align='left'>
60 <input tabindex='7' type='text' name="wpEmail"
61 value="<?php $this->text('email') ?>" size='20' />
62 </td>
63 <?php if( $this->data['userealname'] ) { ?>
64 <td>&nbsp;</td>
65 </tr>
66 <tr>
67 <td align='right'><?php $this->msg('yourrealname') ?>:</td>
68 <td align='left'>
69 <input tabindex='8' type='text' name="wpRealName"
70 value="<?php $this->text('realname') ?>" size='20' />
71 </td>
72 <?php } ?>
73
74 <td align='left'>
75 <input tabindex='9' type='submit' name="wpCreateaccount"
76 value="<?php $this->msg('createaccount') ?>" />
77 <?php if( $this->data['createemail'] ) { ?>
78 <input tabindex='6' type='submit' name="wpCreateaccountMail"
79 value="<?php $this->msg('createaccountmail') ?>" />
80 <?php } ?>
81 </td>
82 </tr>
83 <?php } ?>
84 <tr>
85 <td colspan='3'>&nbsp;</td>
86 </tr>
87 <tr>
88 <td colspan='3' align='left'>
89 <p>
90 <?php $this->msgHtml( 'emailforlost' ) ?><br />
91 <input tabindex='10' type='submit' name="wpMailmypassword"
92 value="<?php $this->msg('mailmypassword') ?>" />
93 </p>
94 </td>
95 </tr>
96 </table>
97 </form>
98 <?php
99 $this->msgHtml( 'loginend' );
100 }
101 }
102
103 ?>